﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using ClientBankWPF.Entities;

namespace BankService.App_Code
{
    [ServiceContract]
    public interface IBankService
    {
        [OperationContract]
        string GetData(int value);

        [OperationContract]
        StateAndReason AddPaymentOrder(PaymentOrder paymentOrder, byte[] eds);

        [OperationContract]
        State DeletePaymentOrder(PaymentOrder paymentOrder, byte[] eds);

        [OperationContract]
        IEnumerable<Transaction> GetTransactions(string clientUnp, string depositNumber, DateTime dateFrom, DateTime dateTo);

        [OperationContract]
        IEnumerable<PaymentOrder> GetPaymentOrders(string clientUnp, DateTime dateFrom, DateTime dateTo, int number);

        [OperationContract]
        State GetPaymentOrderState(Guid paymentOrderId);

        [OperationContract]
        DepositTransactionsHistory GetDepositTransactionsHistory(Guid depositId, DateTime dateFrom, DateTime dateTo);

        //[OperationContract]
        //IList<DepositInfo> GetClientDepositsInfo(Guid clientId);

        [OperationContract]
        IList<Bank> GetBanksList();

        [OperationContract]
        IList<Deposit> GetClientDeposits(Guid idClient);

        [OperationContract]
        IList<Partner> GetClientPartners(Guid idClient);

        [OperationContract]
        void SavePartner(Partner newPartner);

        [OperationContract]
        void UpdatePartner(Partner newPartner);

        [OperationContract]
        void SavePartnersDeposit(PartnerDeposit newPartnersDeposit);

        [OperationContract]
        void UpdatePartnersDeposit(PartnerDeposit newPartnersDeposit);

        [OperationContract]
        int? GetMaxPaymentOrderNumber(decimal unp);
    }
}